package com.bitdf.txing.chat.feign;

import com.bitdf.txing.chat.config.FeignInterceptor;
import com.bitdf.txing.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author Lizhiwei
 * @date 2023/2/1 18:49:47
 * 注释：
 */
@FeignClient(
        name = "tx-users",                 // 服务名称
        configuration = FeignInterceptor.class       // 请求拦截器 （关键代码）
)
public interface ChatUserFeignService {

    /**
     * 查询用户s
     * @param list
     * @return
     */
    @PostMapping("/txing/user/list/ids")
    public R getByUserList(@RequestBody List<Long> list);

    @RequestMapping("/txing/user/info/{id}")
    public R getUserById(@PathVariable("id") Long id);
}
